package cn.sxjzit.officlal.controller;

import cn.sxjzit.officlal.entity.Company;
import cn.sxjzit.officlal.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/company")
public class CompanyController {
    @Autowired
    CompanyService companyService;
    @GetMapping("/list")
    public List<Company> findAll(){
       return companyService.selectAllCompany();
         }
    }

